﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Automobile.service.BLL;
using Automobile.service.Model;

namespace Automobile.service.UI
{
    public partial class ShipMents_list : System.Web.UI.Page
    {
        ShipmentsBLL bll = new ShipmentsBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                Label1.Text = bll.GetShipMentsCount().ToString();
                ShipMentsDatasouce();
            }
        }
        protected void ShipMentsDatasouce()
        {
            Repeater1.DataSource = bll.ShowShipMents();
            Repeater1.DataBind();
        }

        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {

        }

        protected void Unnamed_ServerClick(object sender, EventArgs e)
        {
            Repeater1.DataSource = bll.GetShipMentsByName(Request.QueryString["MemberCard_Name"]);
            Repeater1.DataBind();
        }
    }
}